#include <vector>
#include <deque>
#include <list>
#include <forward_list>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>

#include <iostream>

void test_vector_size(){
	std::vector<int> vi;
	int size = sizeof(vi)/sizeof(int);
	std::cout << size << std::endl;
	std::cout << vi.capacity() << std::endl;

	vi.push_back(1);
	size = sizeof(vi)/sizeof(int);
	std::cout << size << std::endl;
	std::cout << vi.capacity() << std::endl;

	vi.push_back(2);
	size = sizeof(vi)/sizeof(int);
	std::cout << size << std::endl;
	std::cout << vi.capacity() << std::endl;

	vi.push_back(2);
	size = sizeof(vi)/sizeof(int);
	std::cout << size << std::endl;
	std::cout << vi.capacity() << std::endl;

	vi.pop_back();
	size = sizeof(vi)/sizeof(int);
	std::cout << size << std::endl;
	std::cout << vi.capacity() << std::endl;
}

void test_deque_size() {
	std::deque<int> di;
	int size = sizeof(di)/sizeof(int);
	std::cout << size << std::endl;
	std::cout << di.max_size() << std::endl;

	di.push_back(1);
	size = sizeof(di)/sizeof(int);
	std::cout << size << std::endl;
	std::cout << di.max_size() << std::endl;

	di.push_back(2);
	size = sizeof(di)/sizeof(int);
	std::cout << size << std::endl;
	std::cout << di.max_size() << std::endl;

	di.push_back(3);
	size = sizeof(di)/sizeof(int);
	std::cout << size << std::endl;
	std::cout << di.max_size() << std::endl;

	di.pop_back();
	size = sizeof(di)/sizeof(int);
	std::cout << size << std::endl;
	std::cout << di.max_size() << std::endl;
}

void test_list_size() {
	std::cout << "doubly linked list\n";
	std::list<int> li;
	int size = sizeof(li)/sizeof(int);
	std::cout << size << std::endl;

	li.push_back(1);
	size = sizeof(li)/sizeof(int);
	std::cout << size << std::endl;

	li.push_back(2);
	size = sizeof(li)/sizeof(int);
	std::cout << size << std::endl;

	std::cout << "singly linked list\n";
	std::forward_list<int> fli;
	size = sizeof(fli)/sizeof(int);
	std::cout << size << std::endl;

	fli.push_front(1);
	size = sizeof(fli)/sizeof(int);
	std::cout << size << std::endl;

	fli.push_front(2);
	size = sizeof(fli)/sizeof(int);
	std::cout << size << std::endl;
}

void test_set_size() {
	std::set<int> c;
	int size = sizeof(c)/sizeof(int);
	std::cout << size << std::endl;
	
	c.insert( 1 );
	size = sizeof(c)/sizeof(int);
	std::cout << size << std::endl;

	c.insert( 2 );
	size = sizeof(c)/sizeof(int);
	std::cout << size << std::endl;

	std::multiset<int> mc;
	size = sizeof(mc)/sizeof(int);
	std::cout << size << std::endl;

	mc.insert(1);
	size = sizeof(mc)/sizeof(int);
	std::cout << size << std::endl;

	mc.insert(2);
	size = sizeof(mc)/sizeof(int);
	std::cout << size << std::endl;
}

void test_map_size() {
	std::map<int,int> c;
	int size = sizeof(c)/sizeof(int);
	std::cout << size << std::endl;
	
	c.insert(std::pair<int,int>(1,1));
	size = sizeof(c)/sizeof(int);
	std::cout << size << std::endl;

	c.insert(std::make_pair(2,2));
	size = sizeof(c)/sizeof(int);
	std::cout << size << std::endl;

	auto iter0 = c.begin();
	auto iter1 = c.end();

	std::multimap<int,int> mc;
	size = sizeof(mc)/sizeof(int);
	std::cout << size << std::endl;

	mc.insert(std::pair<int,int>(1,1));
	size = sizeof(mc)/sizeof(int);
	std::cout << size << std::endl;

	mc.insert(std::make_pair(2,2));
	size = sizeof(mc)/sizeof(int);
	std::cout << size << std::endl;
}

void test_stack_size() {
	int a[2000];
	a[1999] = 1999;
}

